<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<!--[if lt IE 9]>
<script type="text/javascript" src="../Public/js/html5.js"></script>
<script type="text/javascript" src="../Public/js/respond.min.js"></script>
<script type="text/javascript" src="../Public/js/PIE_IE678.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="../Public/css/H-ui.css"/>
<link type="text/css" rel="stylesheet" href="../Public/css/H-ui.admin.css"/>
<link type="text/css" rel="stylesheet" href="../Public/font/font-awesome.min.css"/>
<!--[if IE 7]>
<link href="../Public/font/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
<![endif]-->
<title>添加管理员</title>
</head>
<body>
<nav class="Hui-breadcrumb"><i class="icon-home"></i> 首页 <span class="c-gray en">&gt;</span><a href="{:U('Admin/Access/index')}">管理员管理</a> <span class="c-gray en">&gt;</span> {$navAction} <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="icon-refresh"></i></a></nav>
<div class="pd-20">
  <div class="Huiform">
    <form action="" method="post" id="form1">
      <table class="table radius table-striped table-hover  " >
        <tbody>

      <tr>
            <th class="text-r"><span class="c-red">*</span> 选择角色组：</th>
            <td style="font-size: 16px"><volist name="data" id="v">{$v['title']}
              <input id="guanli" type="radio" name="id"  value="{$v['id']}">&emsp;</volist>
      <span id="guanli_tips" class="c-red"></span> 
      </td>
          </tr>

          <tr>
            <th width="200"  class="text-r"><span class="c-red">*</span> 帐号：</th>
            <td><input style="width:250px"  <if condition="ACTION_NAME eq 'editAdmin'"> disabled="disabled"</if> name="username" id="username" type="text" placeholder="帐号" class="input-text"  size="40" value="{$info.username}" />
		<span id="username_tips" class="c-red"></span>	
			</td>
          </tr>
         
  
          <tr>
            <th class="text-r"><span class="c-red">*</span> 密码：</th>
            <td><input type="password" style="width:250px" class="input-text" placeholder="密码" value="" id="pwd" name="pwd">
			<span id="pwd_tips" class="c-red"></span>	
			</td>
          </tr>
		  


              <tr>
            <th class="text-r"><span class="c-red">*</span> 邮件地址：</th>
            <td><input type="text" style="width:250px" class="input-text" placeholder="邮件地址" value="{$info.email}" id="email" name="email">
      <span id="email_tips" class="c-red"></span> 
      </td>
          </tr>
         
          <tr>
            <th class="text-r"><span class="c-red">*</span> 状态：</th>
            <td><select name="status" style="width: 90px;">
                                        
                                            <option value="1" selected>启用</option>
                                            <option value="0">禁用</option>
                                    
                                    </select>
                                    如果禁用了将无法登陆本系统
			</td>
          </tr>
		 
		   <tr>
            <th class="text-r"><span class="c-red">*</span> 备注：</th>
            <td><textarea name="remark" rows="6"  cols="40">{$info.remark}</textarea>
			</td>
          </tr>
          <tr>
            <th></th>
            <td><button class="btn btn-success radius" id="submit" type="submit"><i class="icon-ok"></i>确定</button></td>
          </tr>
        </tbody>
      </table>
	    
    </form>
  </div>
</div>
<script type="text/javascript" src="../Public/js/jquery.min.js"></script>
<script type="text/javascript" src="../Public/js/jquery.form.js"></script>
<script type="text/javascript" src="../Public/js/H-ui.admin.js"></script> 

<script type="text/javascript">
var topWindow=$(window.parent.document);
topWindow.find('.active span').html('{$navAction}');
topWindow.find('.active span').attr("data-href",'+this.document.location+'); 
$(function(){
	$("#submit").click(function(){
	  $("#username_tips").html("");
	  $("#email_tips").html("");
	  $("#pwd_tips").html(""); 
    $("#guanli_tips").html("");
      if (!$("input[name=id]").is(":checked")) { 
                    $("#guanli_tips").html("请选择分组");
                   return false;
                    }

     if($("#username").val()==""){
	     $("#username_tips").html("请输入帐号");
		 return false;
	 }
  //    if($("#email").val()==""){
	 //     $("#email_tips").html("请输入邮箱");
		//  return false;
	 // }
    
     <if condition="ACTION_NAME neq 'editAdmin'"> 
	  if($("#pwd").val()==""){
	     $("#pwd_tips").html("请输入密码");
		 return false;
	 } 
	  </if>
     

	});
  
});
 
</script>
</body>
</html>